package com.czwj.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.multipart.MultipartFile;

import com.czwj.entities.UserInfo;

public interface UserInfoService {

	UserInfo findByUserName(String username);

	int update(UserInfo user);

	int insert(UserInfo user);

	int delete(int id);

	List<UserInfo> search(Map<String, Object> map);

	int count(Map<String, Object> map);


	List<UserInfo> level(Map<String, Object> params);

	UserInfo searchbymobile(String mobile);

	int updateStatus(Map<String, Object> map);

	UserInfo selectByPrimaryKey(int userid);
	
	List<UserInfo> selectbycompanyrole(int companyid);

	/**
	* @Title: selectbycompany
	* @Description: TODO
	* @param companyid
	* @return 参数 
	* @return List<UserInfo> 返回类型
	* @throws
	*/
	List<UserInfo> selectbycompany(int companyid);

	/**
	* @Title: duty3
	* @Description: TODO
	* @param params
	* @return 参数 
	* @return List<UserInfo> 返回类型
	* @throws
	*/
	List<UserInfo> duty3(Map<String,Object> params);

	/**
	 * @param projectitemchildid2 
	 * @param createip 
	* @Title: insertjobber
	* @Description: TODO
	* @param name
	* @param jobno
	* @param idcard
	* @param sex
	* @param mobile
	* @param companyid
	* @param departmentid
	* @param projectitemid
	* @param projectitemchildid
	* @param salary
	* @return 参数 
	* @return int 返回类型
	* @throws
	*/
	int insertjobber(String name,String jobno,String idcard,String sex,String mobile,Integer companyid,
			Integer departmentid,Integer createrid,String createip, Integer projectitemid,Integer projectitemchildid, String salary);

	/**
	 * @param request 
	 * @throws Exception 
	* @Title: importExcel
	* @Description: TODO
	* @param excel
	* @return 参数 
	* @return Integer 返回类型
	* @throws
	*/
	Integer importExcel(MultipartFile excel, HttpServletRequest request) throws Exception;

	/**
	* @Title: selectbycompanyroleid
	* @Description: TODO
	* @param companyid
	* @return 参数 
	* @return List<UserInfo> 返回类型
	* @throws
	*/
	List<UserInfo> selectbycompanyroleid(Integer companyid);
	
}
